import {Todo} from '../types/todo'
export function saveTodos(todos:Todo[]){
// 保存到浏览器的缓存中
      localStorage.setItem('todos_key',JSON.stringify(value))
}

//读取数据从浏览器的缓存中
export function readTodos():Todo[]{
    return JSON.parse(localStorage.getItem('todos_key') || '[]')
}